#ifndef __NJGIS_INJMODELSERVICEINSTANCE_H__
#define __NJGIS_INJMODELSERVICEINSTANCE_H__

#include <string>
#include <vector>

#include "INxService.h"
#include "INxRunningLog.h"
#include "INxDataConfiguration.h"

namespace NJGIS
{
    namespace SERVICE
    {
		typedef enum
		{
			INSTA_UNKNOWN = 0,
			INSTA_RUNNING = 1,
			INSTA_REQUESTING = 2,
			INSTA_HANGING = 3,
			INSTA_FINISHED = 4
		}NjModelInstanceStatus;

        class INjModelServiceInstance : public virtual INjService
        {
        public:
            virtual const char* getCurrentState() = 0;

			virtual const char* getCurrentEvent() = 0;

			virtual const char* getGUID() = 0;

			virtual const char* getStartTime() = 0;

			virtual const char* getModelServiceID() = 0;

            virtual std::vector<INjRunningLog*>* getLogs() = 0;

			virtual std::vector<INjRunningLog*>* getNewLogs() = 0;

			virtual NjModelInstanceStatus getStatus() = 0;

            virtual int kill() = 0;

			virtual int pause() = 0;

			virtual int restart() = 0;

			//! Defualt Timeout is 7200 seconds, if you need longer, please set a larger value as you request.
			virtual int wait4Status(NJGIS::SERVICE::NjModelInstanceStatus status, double timeout = 7200, bool log = false) = 0;

			virtual int refresh() = 0;
        };
    }
}

#endif